package com.len.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum PayTypeEnums {

    PAY_TYPE0(0, "VNBANKQR"),
    PAY_TYPE1(1, "VNZALO"),
    PAY_TYPE2(2, "VNMOMO"),
    PAY_TYPE3(3, "VNVTPAY");

    private final Integer code;
    private final String message;

    public static PayTypeEnums getEnumByCode(Integer code) {
        if (code != null) {
            for (PayTypeEnums _enum : values()) {
                if (_enum.getCode().equals(code)) {
                    return _enum;
                }
            }
        }
        return null;
    }

}
